import os
from flask import Flask
from base.application.builder import Builder
from base.config.service_config import ServicePort

service_name = os.getenv('SERVICE_NAME')
app = Flask(service_name)
Builder(app=app).build(service_name)

if __name__ == '__main__':
    # app.run(host="0.0.0.0", port=8080)
    app.run(host="0.0.0.0", port=getattr(ServicePort, service_name))
